<template>
	<view>
		
		<!-- 头像昵称 -->
		<head-box />
		
		<!-- 导航 -->
		<home-menu :noteDataCount="noteDataCount" />
		
	</view>
</template>

<script>
	// 导入组件
	import headBox from './components/head-box'
	import homeMenu from './components/home-menu'
	
	import { getCountNoteNums } from '@/http/api'
	
	export default {
		// 注册组件
		components:{ headBox , homeMenu },
		data() {
			return {
				noteDataCount:{
					noteSum:0,	//笔记数量统计
					shareSum:0	//分享数量统计
				}
			}
		},
		onShow() {
			this.getCountNoteNums()
		},
		methods: {
			// 查询用户统计数据
			async getCountNoteNums()
			{
				let res = await getCountNoteNums();
				this.noteDataCount = res.data
			}
		}
	}
</script>

<style scoped lang="scss">

</style>
